package com.ruicar.afs.cloud.bizcommon.algorithm.feign;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.bizcommon.algorithm.entity.AfsCalInputInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.context.annotation.Description;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Map;

/**
 * @author yaorui.zhang
 * @version 1.0
 * @Description 算法接口-贴息金额
 * @date create on 2020年6月2日11:09:22
 * @since 1.0
 */
@FeignClient(name = "DiscountFeign", url = "${com.greatwall.systems.algorithm-system.url}")
public interface DiscountFeign {

    @Description("等本息")
    @GetMapping(value = "/equalrental/discount")
    public JSONObject equalrental(@SpringQueryMap AfsCalInputInfo info, @RequestHeader Map<String, String> headers);

    @Description("等本金")
    @GetMapping(value = "/equalprincipal/discount")
    public JSONObject equalprincipal(@SpringQueryMap AfsCalInputInfo info, @RequestHeader Map<String, String> headers);

    @Description("分段贷")
    @GetMapping(value = "/ballonloan/discount")
    public JSONObject ballonloan(@SpringQueryMap AfsCalInputInfo info, @RequestHeader Map<String, String> headers);

    @Description("结构化还款计算贴息")
    @GetMapping(value = "/structuredloan/discount")
    public JSONObject structuredloan(@SpringQueryMap AfsCalInputInfo info, @RequestHeader Map<String, String> headers);

    @Description("等比累进")
    @GetMapping(value = "/equalratioret/discount")
    public JSONObject equalratioret(@SpringQueryMap AfsCalInputInfo info, @RequestHeader Map<String, String> headers);

    @Description("等额累进计算贴息")
    @GetMapping(value = "/equalquota/discount")
    public JSONObject equalquota(@SpringQueryMap AfsCalInputInfo info, @RequestHeader Map<String, String> headers);

    @Description("任意贷")
    @GetMapping(value = "/arbitraryloan/discount")
    public JSONObject arbitraryloan(@SpringQueryMap AfsCalInputInfo info, @RequestHeader Map<String, String> headers);

}
